redis 套件的 Property 'on' does not exist on type 'RedisClientType'


再用 typescript 開發時發現 client.on('error', (err) => console.log('Redis Client Error', err)); 會跳出錯誤 Property 'on' does not exist on type 'RedisClientType' ,加上 npm i -D @types/node 就解決了

#TypeScript #VS Code #Redis #nodejs #ts #js #Node






你可能感興趣的文章

建立自動化檢查的 React App(Husky, prettier, eslint, lint-statge)

建立自動化檢查的 React App(Husky, prettier, eslint, lint-statge)

使用 Python 資料分析和視覺化上市櫃公司薪資公開資料

使用 Python 資料分析和視覺化上市櫃公司薪資公開資料

DAY29:Array.diff

DAY29:Array.diff






留言討論